using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Super
{
	[RequireComponent(typeof(Animator))]
	public class AniProgressTrigger : MonoBehaviour
	{
		private Animator ani;
		public Animator Ani
		{
			get
			{
				if (ani == null)
					ani = GetComponent<Animator>();
				return ani;
			}
		}
		
		public void EffectStart()
		{
			AniChangeState evt = new AniChangeState(Ani, AniState.EffectStart);
			EventManager.Emit(evt);
		}
		
		public void EffectEnd()
		{
			AniChangeState evt = new AniChangeState(Ani, AniState.EffectEnd);
			EventManager.Emit(evt);
		}
		
		public void KeyPoint()
		{
			AniChangeState evt = new AniChangeState(Ani, AniState.KeyPoint);
			EventManager.Emit(evt);
		}
	}
}


